﻿using System;
using System.Collections.Generic;
using System.Linq;

using Microsoft.Xna.Framework.Graphics;

namespace WorldOnFire
{
    public class CTurretRelay : ABCTurret
    {
        protected int m_nRelayIndex;

        public override void Initialize(int _nObjectCount)
        {
            // Initialize the base members
            base.Initialize(_nObjectCount);

            m_eEnemyTargetingPreference = new ABCEnemy.eEnemyType[]
            {
                ABCEnemy.eEnemyType.JUGGERNAUT,
                ABCEnemy.eEnemyType.BATTLESHIP,
                ABCEnemy.eEnemyType.DESTROYER,
                ABCEnemy.eEnemyType.CARRIER,
                ABCEnemy.eEnemyType.CRUISER,
                ABCEnemy.eEnemyType.DETONATOR,
                ABCEnemy.eEnemyType.FRIGATE,
                ABCEnemy.eEnemyType.BOMBER,
                ABCEnemy.eEnemyType.GUARDIAN
            }; 

            for (int iObject = 0; iObject < _nObjectCount; ++iObject)
            {
                m_fRange[iObject] = 500.0f;
                m_fDamage[iObject] = 0.0f;
                m_fShotDelay[iObject] = 5.0f;
                m_fShotSpeed[iObject] = 100.0f;
            }

            // Set the enumerations
            eBaseType[] eBaseTypes = new eBaseType[] { eBaseType.TURRET };
            this.SetBaseTypeID(eBaseTypes);

            this.SetObjectType(eObjectType.TURRET_RELAY);
            this.SetTurretType(eTurretType.RELAY);
            this.SetProjectileType(ABCProjectile.eProjectileType.RELAY);
        }

        public override void LoadContent()
        {
            // Load the model
            m_eModelID = CRenderingManager.eModelID.TURRET_RELAY;

            // Load base content
            base.LoadContent();
        }
    }
}